package com.education.cms.web.nginxTest;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class NginxController {
    @Value("${server.port}")
    private String port;

    @RequestMapping("/nginx")
    public String nginxTest(HttpServletRequest request){
        String sessionId = (String) request.getSession().getId();
        return "hi~ my server port is "+ port +",and my sessionId is "+ sessionId;
    }
}
